<!DOCTYPE html>
<html>
<head>
  <title>Mangalib on Rails</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>


<div id="user_nav">
  <% if current_user %>
    Logged in as <%= current_user.login %>.
    <%= link_to "Log out", log_out_path %>
    <%= link_to "My account", user_path(current_user)%>
    <%= link_to "Manage", manage_path if current_user.admin %>
  <% else %>
    <%= link_to "Sign up", sign_up_path %> or
    <%= link_to "log in", log_in_path %>
  <% end %>
  <br />
</div>

<div id="menu">
	<%= link_to "Welcome" , root_path%>
	<%= link_to "Collection", collections_path %>
	<%= link_to "Books", books_path %>
	<%= link_to "User Collections", user_collections_path %>
	<%= link_to "My Books" , user_books_path %>
</div>	
	<br /><br />
	
<% flash.each do |name, msg| %>
  <%= content_tag :div, msg, :id => "flash_#{name}" %>
<% end %>
	
	
<%= yield %>

</body>
</html>
